package com.bps.zzant.controller;

import java.util.List;
import java.util.Locale;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.bps.zzant.model.Customer;
import com.bps.zzant.services.CustomerService;


@Controller

public class CustomerController extends ZzantController{
	private static final Logger logger = LoggerFactory.getLogger(CustomerController.class);
	
	/**
	 * Simply selects the home view to render by returning its name.
	 */
	@Autowired
	private CustomerService customerService;
	public void setCustomerService(CustomerService customerService) {
		this.customerService = customerService;
	}


	@RequestMapping(value = "/customerlist", method = RequestMethod.GET)
	public String home(Locale locale, Model model) {
		logger.info("CustomerController! the client locale is "+ locale.toString());
		// List<Customer> customerList = customerService.getAllCustomers();
		// logger.info("CustomerController! customer size: "+ customerList.size());
		return "customerlist";
	}
}
